#ifndef _LOGMANAGER_H__
#define _LOGMANAGER_H__

#include"Log/LogTypes.h"
#include<fstream>
#include<stdarg.h>

/**************************************************************************************************
%[flags][width][.precision][length]specifier 
[flags]:
	+: Forces a plus or minus sign even for positive numbers
	#: Used with o, x, and X specifiers. Applies the prefix 0, 0x, 0X respectively

[width]:
	(number): Minimum number of characters to be printed
	*: Number of characteers is specified by a integer preceeding the format data
	  ex. "Padded number: %*d", 5, 10; prints "Padded number:      10"

[.precision]:
	.number: specifies the number of digits to print for numerical specifiers
	.*: number of digits is listed after the format string.

specifier:
	c: Character
	i: Integer
	d: Double
	f: Float
	s: String
	p: Pointer address
	%: prints a % to stdout
**************************************************************************************************/

class Log
{
private:
	std::ofstream mLogFile;

	bool mUseTimeStamp;

	ILogObject* mpLogObject;

public:
	//opens a new file with the specified file name
	Log(const char * filename, ILogObject* logObject);
	~Log() { mLogFile.close(); }
	//Writes data to the ofstream
	void Write(const char* logline, ...);
};

#endif